package com.atguigu.maven.serverce;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.atguigu.maven.bean.Employee;

import com.atguigu.maven.mapper.EmployeeMapper;
@Service
public class EmployeeServerceImpl implements EmployeeServerce{
	@Autowired
	private EmployeeMapper employeemapper;
	
	
	
	
	@Override
	public List<Employee> getAllEmps() {
		List<Employee> all = employeemapper.getAll();
		return all;
	}

	@Override
	public Employee getEmpsById(Integer id) {
		Employee employee = employeemapper.getEmpById(id);
		return employee;
	}

	@Override
	public void addEmps(Employee employee) {
		employeemapper.addEmp(employee);
		
	}

	@Override
	public void updateEmps( Employee employee) {
		employeemapper.updateEmp( employee);		
	}

	@Override
	public void deleteEmps(Integer id) {
		employeemapper.deleteEmp(id);		
	}
	
	

}
